package com.pkk.cloud.support.gataway.spring.enums.code;

import com.pkk.components.rpc.enums.CodeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * @description: 网关状态码
 * @author: peikunkun
 * @create: 2019-08-21 16:37
 **/
@AllArgsConstructor
@Getter
public enum GatewayCodeStatus implements CodeEnum<Integer, String> {
  /**
   * 正常
   */
  OK(1, "服务不可用"),

  FAIL(-1, "服务异常，请稍后重试"),

  SERVER_ERROR(500, "服务内部运行异常！"),
  //请求频繁
  TOO_MANY_REQUESTS(HttpStatus.TOO_MANY_REQUESTS.value(), "请求过于频繁");

  private static final long serialVersionUID = 4933834729635764156L;

  private Integer code;
  private String msg;
}
